<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of gtm</title>
  <meta name="keywords" content="gtm">
  <meta name="description" content="GTM	Create a Generative Topographic Map.">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../menu.html">Home</a> &gt;  <a href="#">ReBEL-0.2.7</a> &gt; <a href="#">netlab</a> &gt; gtm.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../menu.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="menu.html">Index for .\ReBEL-0.2.7\netlab&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>gtm
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>GTM	Create a Generative Topographic Map.</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function net = gtm(dim_latent, nlatent, dim_data, ncentres, rbfunc,prior) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment">GTM    Create a Generative Topographic Map.

    Description

    NET = GTM(DIMLATENT, NLATENT, DIMDATA, NCENTRES, RBFUNC), takes the
    dimension of the latent space DIMLATENT, the number of data points
    sampled in the latent space NLATENT, the dimension of the data space
    DIMDATA, the number of centres in the RBF model NCENTRES, the
    activation function for the RBF RBFUNC and returns a data structure
    NET. The parameters in the RBF and GMM sub-models are set by calls to
    the corresponding creation routines RBF and GMM.

    The fields in NET are
      type = 'gtm'
      nin = dimension of data space
      dimlatent = dimension of latent space
      rbfnet = RBF network data structure
      gmmnet = GMM data structure
      X = sample of latent points

    NET = GTM(DIMLATENT, NLATENT, DIMDATA, NCENTRES, RBFUNC, PRIOR),
    sets a Gaussian zero mean prior on the parameters of the RBF model.
    PRIOR must be a scalar and represents the inverse variance of the
    prior distribution.  This gives rise to a weight decay term in the
    error function.

    See also
    <a href="gtmfwd.html" class="code" title="function mix = gtmfwd(net)">GTMFWD</a>, <a href="gtmpost.html" class="code" title="function [post, a] = gtmpost(net, data)">GTMPOST</a>, <a href="rbf.html" class="code" title="function net = rbf(nin, nhidden, nout, rbfunc, outfunc, prior, beta)">RBF</a>, <a href="gmm.html" class="code" title="function mix = gmm(dim, ncentres, covar_type, ppca_dim)">GMM</a></pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="gmm.html" class="code" title="function mix = gmm(dim, ncentres, covar_type, ppca_dim)">gmm</a>	GMM	Creates a Gaussian mixture model with specified architecture.</li><li><a href="rbf.html" class="code" title="function net = rbf(nin, nhidden, nout, rbfunc, outfunc, prior, beta)">rbf</a>	RBF	Creates an RBF network with specified architecture</li><li><a href="rbfprior.html" class="code" title="function [mask, prior] = rbfprior(rbfunc, nin, nhidden, nout, aw2, ab2)">rbfprior</a>	RBFPRIOR Create Gaussian prior and output layer mask for RBF.</li></ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="demgtm1.html" class="code" title="">demgtm1</a>	DEMGTM1 Demonstrate EM for GTM.</li><li><a href="demgtm2.html" class="code" title="">demgtm2</a>	DEMGTM2 Demonstrate GTM for visualisation.</li></ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function net = gtm(dim_latent, nlatent, dim_data, ncentres, rbfunc, </a><span class="keyword">...</span>
0002    prior)
0003 <span class="comment">%GTM    Create a Generative Topographic Map.</span>
0004 <span class="comment">%</span>
0005 <span class="comment">%    Description</span>
0006 <span class="comment">%</span>
0007 <span class="comment">%    NET = GTM(DIMLATENT, NLATENT, DIMDATA, NCENTRES, RBFUNC), takes the</span>
0008 <span class="comment">%    dimension of the latent space DIMLATENT, the number of data points</span>
0009 <span class="comment">%    sampled in the latent space NLATENT, the dimension of the data space</span>
0010 <span class="comment">%    DIMDATA, the number of centres in the RBF model NCENTRES, the</span>
0011 <span class="comment">%    activation function for the RBF RBFUNC and returns a data structure</span>
0012 <span class="comment">%    NET. The parameters in the RBF and GMM sub-models are set by calls to</span>
0013 <span class="comment">%    the corresponding creation routines RBF and GMM.</span>
0014 <span class="comment">%</span>
0015 <span class="comment">%    The fields in NET are</span>
0016 <span class="comment">%      type = 'gtm'</span>
0017 <span class="comment">%      nin = dimension of data space</span>
0018 <span class="comment">%      dimlatent = dimension of latent space</span>
0019 <span class="comment">%      rbfnet = RBF network data structure</span>
0020 <span class="comment">%      gmmnet = GMM data structure</span>
0021 <span class="comment">%      X = sample of latent points</span>
0022 <span class="comment">%</span>
0023 <span class="comment">%    NET = GTM(DIMLATENT, NLATENT, DIMDATA, NCENTRES, RBFUNC, PRIOR),</span>
0024 <span class="comment">%    sets a Gaussian zero mean prior on the parameters of the RBF model.</span>
0025 <span class="comment">%    PRIOR must be a scalar and represents the inverse variance of the</span>
0026 <span class="comment">%    prior distribution.  This gives rise to a weight decay term in the</span>
0027 <span class="comment">%    error function.</span>
0028 <span class="comment">%</span>
0029 <span class="comment">%    See also</span>
0030 <span class="comment">%    GTMFWD, GTMPOST, RBF, GMM</span>
0031 <span class="comment">%</span>
0032 
0033 <span class="comment">%    Copyright (c) Ian T Nabney (1996-2001)</span>
0034 
0035 net.type = <span class="string">'gtm'</span>;
0036 <span class="comment">% Input to functions is data</span>
0037 net.nin = dim_data;
0038 net.dim_latent = dim_latent;
0039 
0040 <span class="comment">% Default is no regularisation</span>
0041 <span class="keyword">if</span> nargin == 5
0042    prior = 0.0;
0043 <span class="keyword">end</span>
0044 
0045 <span class="comment">% Only allow scalar prior</span>
0046 <span class="keyword">if</span> isstruct(prior) | size(prior) ~= [1 1]
0047    error(<span class="string">'Prior must be a scalar'</span>);
0048 <span class="keyword">end</span>
0049 
0050 <span class="comment">% Create RBF network</span>
0051 net.rbfnet = <a href="rbf.html" class="code" title="function net = rbf(nin, nhidden, nout, rbfunc, outfunc, prior, beta)">rbf</a>(dim_latent, ncentres, dim_data, rbfunc, <span class="keyword">...</span>
0052    <span class="string">'linear'</span>, prior);
0053 
0054 <span class="comment">% Mask all but output weights</span>
0055 net.rbfnet.mask = <a href="rbfprior.html" class="code" title="function [mask, prior] = rbfprior(rbfunc, nin, nhidden, nout, aw2, ab2)">rbfprior</a>(rbfunc, dim_latent, ncentres, dim_data);
0056 
0057 <span class="comment">% Create field for GMM output model</span>
0058 net.gmmnet = <a href="gmm.html" class="code" title="function mix = gmm(dim, ncentres, covar_type, ppca_dim)">gmm</a>(dim_data, nlatent, <span class="string">'spherical'</span>);
0059 
0060 <span class="comment">% Create empty latent data sample</span>
0061 net.X = [];</pre></div>
<hr><address>Generated on Tue 26-Sep-2006 10:36:21 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>